home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club KidSoft Volume 3 #2
/
CKSPCV32.BIN
/
movies
/
clubart.dir
/
00001_Script_Movie Script
next >
Wrap
Text File
|
1995-04-06
|
17KB
|
496 lines
on startMovie
global gCurrentButton
global gMediaFolder
StdStartMovie
if InitKidsoft() = FALSE then
alert "Error in InitKidsoft"
end if
-- InitKidsoft -- standard init
set movPath = gMediaFolder & "CLUBROOM"
if getPos(the searchPaths, movPath) = 0 then
add (the searchPaths, movPath) -- find the movies here
end if
set gCurrentButton = 3
set the preLoadEventAbort = TRUE
cursor 0
-- Art Play
global gSpritePlayOver
global gSpritePalyDown
global gSpriteNextOff
global gSpriteNextOver
global gSpriteNextDown
global gSpritePrevOff
global gSpritePrevOver
global gSpritePrevDown
global gSpriteThumb
global gArtPlayOffStart
global gArtPlayOffEnd
--position lists
-- global gFishPosition
-- global gHandPosition
global gArtNumFrames
global gArtFrame
global gArtPlay
global gArtFrameBarStep
global gArtFrameBarH
global gArtFrameBarV
global gArtMove
global gArtPlayFirstTime
global gArtSprite1
global gArtSprite2
global gArtSprite3
global gArtSprite4
global gArtPositionSprite1
global gArtPositionSprite2
global gArtPositionSprite3
global gArtPositionSprite4
set gArtNumFrames to 15
set gArtPlay to FALSE
set gArtSprite1 to 14
set gArtSprite2 to 15
set gArtSprite3 to 16
set gArtSprite4 to 17
set gArtPositionSprite1 to [point(200, 251), point(478, 182), point(441, 158), point(261, 222), ¼
point(324, 206), point(248, 200), point(214, 240), point(192, 206), point(226, 256), point(300, 305), ¼
point(320, 240), point(320, 240), point(218, 168), point(176, 150), point(165, 114), point(165, 114)]
set gArtPositionSprite2 to [point(205, 132), point(202, 132), point(262, 158), point(340, 102), point(394, 122),¼
point(487, 145), point(519, 215), point(378, 142), point(232, 156), point(284, 252), point(336, 216),¼
point(256, 192), point(197, 133), point(131, 99), point(151, 84), point(151, 84)]
set gArtPositionSprite3 to [point(205, 132), point(202, 132), point(262, 158), point(340, 102), point(394, 122),¼
point(487, 145), point(519, 215), point(378, 142), point(232, 156), point(284, 252), point(336, 216),¼
point(256, 192), point(197, 133), point(131, 99), point(151, 84), point(151, 84)]
set gArtPositionSprite4 to [point(205, 132), point(202, 132), point(262, 158), point(340, 102), point(394, 122),¼
point(487, 145), point(519, 215), point(378, 142), point(232, 156), point(284, 252), point(336, 216),¼
point(256, 192), point(197, 133), point(131, 99), point(151, 84), point(151, 84)]
global gArtCast1
global gArtCast2
global gArtCast3
global gArtCast4
set gArtCast1 to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
set gArtCast2 to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
set gArtCast3 to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
set gArtCast4 to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
global gArtSounds
set gArtSounds = ["PLAYBALL.AIF", "HORSEY.AIF", "DUCK.AIF", "JBDANCE.AIF", ¼
"TRAFFIC.AIF", "3POINTER.AIF"]
global gArtMarker
global gArtMarkerSprite
set gArtMarkerSprite to 22
set gArtMarker to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
cursor 0 -- normal cursor
end
---------------------------------------------------------
-- free the lists
---------------------------------------------------------
on stopMovie
global gArtPositionSprite1
global gArtPositionSprite2
global gArtPositionSprite3
global gArtPositionSprite4
global gArtSounds
set gArtPositionSprite1=0
set gArtPositionSprite2=0
set gArtPositionSprite3=0
set gArtPositionSprite4=0
set gArtSounds = 0
global gArtCast1
global gArtCast2
global gArtCast3
global gArtCast4
set gArtCast1 to 0
set gArtCast2 to 0
set gArtCast3 to 0
set gArtCast4 to 0
global gArtMarker
set gArtMarker to 0
end
-------------------------------------------------------
--Test the buttons in Club Art
-------------------------------------------------------
on testClubArtButtons
global gCurrentButton
global gSpriteReturnOver
global gSpriteReturnDown
global gSpritePlayOver
global gSpritePlayDown
global gSpriteNextOff
global gSpriteNextOver
global gSpriteNextDown
global gSpritePrevOff
global gSpritePrevOver
global gSpritePrevDown
global gSpriteThumb
global gArtPlay
--put gCurrentButton, the frame, label ("Art Demos")
if (gCurrentButton = 0) then
if rollOver(5) = TRUE and the frame <> marker(0) + 1 then -- Frame Bar
set gCurrentButton = 5
StartSound "CLICK"
set the castNum of sprite gSpriteThumb to the number of cast "MKRHILITE.PIC"
updateStage
else if rollOver(6) = TRUE then -- Play Button
set gCurrentButton = 6
StartSound "CLICK"
set the visible of sprite gSpritePlayOver to TRUE
updateStage
else if rollOver(7) = TRUE and the frame >= label ("Art DK") then --Prev Art
set gCurrentButton = 7
StartSound "CLICK"
set the visible of sprite gSpritePrevOver to TRUE
updateStage
else if rollOver(8) = TRUE and the frame < label ("Art DR") then --Next Art
set gCurrentButton = 8
StartSound "CLICK"
set the visible of sprite gSpriteNextOver to TRUE
updateStage
else if rollOver(10) = TRUE then --return button
set gCurrentButton = 10
StartSound "CLICK"
set the visible of sprite gSpriteReturnOver = TRUE
updateStage
-- else if rollOver( gSpriteThumb) and the frame <> marker(0) = TRUE then
-- set gCurrentButton = gSpriteThumb
-- set the castNum of sprite gSpriteThumb to the number of cast "MKRHILITE.PIC"
-- updateStage
end if
else
if (rollOver(gCurrentButton) = FALSE) then -- not over any button
-- 888888888888888888888
if (gCurrentButton = 5 ) and the frame <> marker(0) + 1 then -- Frame Bar
set the castNum of sprite gSpriteThumb to the number of cast "MARKER.PIC"
else if (gCurrentButton = 6) then -- Play Button
set the visible of sprite gSpritePlayOver to FALSE
set the visible of sprite gSpritePlayDown to FALSE
else if (gCurrentButton = 7) then --Prev Art
set the visible of sprite gSpritePrevOver to FALSE
set the visible of sprite gSpritePrevDown to FALSE
else if (gCurrentButton = 8) then --Next Art
set the visible of sprite gSpriteNextOver to FALSE
set the visible of sprite gSpriteNextDown to FALSE
else if (gCurrentButton = 10) then --return button
set the visible of sprite gSpriteReturnOver = FALSE
set the visible of sprite gSpriteReturnDown = FALSE
end if
-- 888888888888888888888
set gCurrentButton = 0
updateStage
end if
end if
end
-------------------------------------------------------
--test Club Art buttons on a mouse Down
-------------------------------------------------------
on testDownClubArtButtons
global gCurrentButton
global gSpriteReturnOver
global gSpriteReturnDown
global gSpritePlayOver
global gSpritePlayDown
global gSpriteNextOff
global gSpriteNextOver
global gSpriteNextDown
global gSpritePrevOff
global gSpritePrevOver
global gSpritePrevDown
global gArtPlay
if gCurrentButton = 7 then --Prev Art
set the visible of sprite gSpritePrevOver = FALSE
set the visible of sprite gSpritePrevDown = TRUE
updateStage
else if gCurrentButton = 8 then --Next Art
set the visible of sprite gSpriteNextOver = FALSE
set the visible of sprite gSpriteNextDown = TRUE
updateStage
else if gCurrentButton = 10 then
set the visible of sprite gSpriteReturnOver = FALSE
set the visible of sprite gSpriteReturnDown = TRUE
updateStage
-- else if rollOver(gSpriteThumb) = TRUE then
-- set gCurrentButton = gSpriteThumb
-- set the castNum of sprite gSpriteThumb to the number of cast "MKRCLICK.PIC"
-- updateStage
end if
end
--------------------------------------------------------------------------
on clubArtPuppetsOff
global gArtSprite1
global gArtSprite2
global gArtSprite3
global gArtSprite4
set the puppet of sprite gArtSprite1 to FALSE
set the puppet of sprite gArtSprite2 to FALSE
set the puppet of sprite gArtSprite3 to FALSE
set the puppet of sprite gArtSprite4 to FALSE
-- set the moveableSprite of sprite gArtSprite1 to FALSE
-- set the moveableSprite of sprite gArtSprite2 to FALSE
-- set the moveableSprite of sprite gArtSprite3 to FALSE
updateStage
end
-------------------------------------------------------
--test Club Art buttons on a mouse Up
-------------------------------------------------------
on testUpClubArtButtons
global gCurrentButton
global gSpriteReturnOver
global gSpriteReturnDown
global gSpritePlayOver
global gSpritePlayDown
global gSpriteNextOff
global gSpriteNextOver
global gSpriteNextDown
global gSpritePrevOff
global gSpritePrevOver
global gSpritePrevDown
global gSpriteThumb
global gArtPlay
global gArtSprite1
global gArtSprite2
global gArtSprite3
global gArtSprite4
global gArtPositionSprite1
global gArtPositionSprite2
global gArtPositionSprite3
global gArtPositionSprite4
if gCurrentButton = 7 and the frame > label ("Art 2") then --Prev Art
set the visible of sprite gSpritePrevOver = TRUE
set the visible of sprite gSpritePrevDown = FALSE
clubArtPuppetsOff
cursor 4
updateStage
go to marker(-1)
else if gCurrentButton = 8 then --Next Art
set the visible of sprite gSpriteNextOver = TRUE
set the visible of sprite gSpriteNextDown = FALSE
clubArtPuppetsOff
cursor 4
updateStage
go to marker(1)
-- else if gCurrentButton = gSpriteThumb then
-- set the castNum of sprite gSpriteThumb to the number of cast "MKRHILITE.PIC"
-- set place = (the mouseH - gArtFrameBarH) / gArtFrameBarStep
-- go to marker(0) + 2 + place
-- updateStage
else if gCurrentButton = 10 and rollover(10) then -- return to the entrance
clubArtButtonsOff
clubArtPuppetsOff
cursor 4
go to movie "CLUBROOM"
end if
end
-------------------------------------------------------
--Move sprites Club Art
-------------------------------------------------------
on moveSpritesClubArt
global gArtPlay
global gFishPosition
global gHandPosition
global gArtFrame
global gArtSprite1
global gArtSprite2
global gArtSprite3
global gArtSprite4
global gArtPositionSprite1
global gArtPositionSprite2
global gArtPositionSprite3
global gArtPositionSprite4
if gArtPlay = FALSE then
if the clickOn = gArtSprite1 then
set newLoc to point( the locH of sprite gArtSprite1, the locV of sprite gArtSprite1 )
setAt gArtPositionSprite1, gArtFrame, newLoc
else if the clickOn = gArtSprite2 then
set newLoc to point( the locH of sprite gArtSprite2, the locV of sprite gArtSprite2)
setAt gArtPositionSprite2, gArtFrame, newLoc
else if the clickOn = gArtSprite3 then
set newLoc to point( the locH of sprite gArtSprite3, the locV of sprite gArtSprite3)
setAt gArtPositionSprite3, gArtFrame, newLoc
else if the clickOn = gArtSprite4 then
set newLoc to point( the locH of sprite gArtSprite4, the locV of sprite gArtSprite4)
setAt gArtPositionSprite4, gArtFrame, newLoc
end if
end if
end
-------------------------------------------------------
--Turn off button sprites
-------------------------------------------------------
on clubArtButtonsOff
global gCurrentButton
global gArtPlayOffStart
global gArtPlayOffEnd
set i = gArtPlayOffStart
repeat while i <= gArtPlayOffEnd
set the visible of sprite i to FALSE
set i = i + 1
end repeat
set gCurrentButton = 0
end
-------------------------------------------------------
--positoin the pupets in the Art Gallery
-------------------------------------------------------
on advanceArt
global gFishPosition
global gHandPosition
global gArtNumFrames
global gArtSprite1
global gArtSprite2
global gArtSprite3
global gArtSprite4
global gArtPositionSprite1
global gArtPositionSprite2
global gArtPositionSprite3
global gArtPositionSprite4
global gArtCast1
global gArtCast2
global gArtCast3
global gArtCast4
global gArtMarker, gArtMarkerSprite
global gArtPlay
global gArtPlayFirstTime
global gArtFrame
global gArtFrameBarStep
global gArtFrameBarH
global gArtFrameBarV
-- index for the frame
set gArtFrame = the frame - 1 -marker(0)
if not gArtPlay = FALSE then
-- put "advanceArt"
if(gArtPlayFirstTime) then
-- append gFishPosition, point (the locH of sprite 14, the locV of sprite 14)
setAt gArtPositionSprite1, gArtFrame, point (the locH of sprite gArtSprite1, the locV of sprite gArtSprite1)
setAt gArtPositionSprite2, gArtFrame, point (the locH of sprite gArtSprite2, the locV of sprite gArtSprite2)
setAt gArtPositionSprite3, gArtFrame, point (the locH of sprite gArtSprite3, the locV of sprite gArtSprite3)
setAt gArtPositionSprite4, gArtFrame, point (the locH of sprite gArtSprite4, the locV of sprite gArtSprite4)
setAt gArtCast1, gArtFrame, the castNum of sprite gArtSprite1
setAt gArtCast2, gArtFrame, the castNum of sprite gArtSprite2
setAt gArtCast3, gArtFrame, the castNum of sprite gArtSprite3
setAt gArtCast4, gArtFrame, the castNum of sprite gArtSprite4
setAt gArtMarker, gArtFrame, the locH of sprite gArtMarkerSprite
-- put "set"&&gArtFrame
else
set the locH of sprite gArtSprite1 to getAt(getAt(gArtPositionSprite1, gArtFrame), 1)
set the locV of sprite gArtSprite1 to getAt(getAt(gArtPositionSprite1, gArtFrame), 2)
set the locH of sprite gArtSprite2 to getAt(getAt (gArtPositionSprite2, gArtFrame), 1)
set the locV of sprite gArtSprite2 to getAt(getAt (gArtPositionSprite2, gArtFrame), 2)
set the locH of sprite gArtSprite3 to getAt(getAt (gArtPositionSprite3, gArtFrame), 1)
set the locV of sprite gArtSprite3 to getAt(getAt (gArtPositionSprite3, gArtFrame), 2)
set the locH of sprite gArtSprite4 to getAt(getAt (gArtPositionSprite4, gArtFrame), 1)
set the locV of sprite gArtSprite4 to getAt(getAt (gArtPositionSprite4, gArtFrame), 2)
set the castNum of sprite gArtSprite1 to getAt (gArtCast1, gArtFrame)
set the castNum of sprite gArtSprite2 to getAt (gArtCast2, gArtFrame)
set the castNum of sprite gArtSprite3 to getAt (gArtCast3, gArtFrame)
set the castNum of sprite gArtSprite4 to getAt (gArtCast4, gArtFrame)
end if
end if
end
--**************************************************************************
--on positionFrameThumb
-- global gArtFrameBarStep
-- global gArtFrameBarH
-- global gArtFrameBarV
-- global gArtFrame
-- global gArtNumFrames
--
-- if gArtFrameBarStep > 0 then
-- set testPos to (the mouseH - the left of sprite 19 + gArtFrameBarStep / 2) / gArtFrameBarStep
-- set testPos to testPos + 1
-- if testPos < 1 then set testPos to 1
-- if testPos > gArtNumFrames then set testPost to gArtNumFrames
--
-- set gArtFrame = testPos
-- set the locV of sprite 20 to gArtFrameBarV
-- set the locH of sprite 20 to gArtFrameBarH + (gArtFrame - 1) * gArtFrameBarStep
--
-- set the locH of sprite 14 to getAt(getAt(gFishPosition, gArtFrame), 1)
-- set the locV of sprite 14 to getAt(getAt(gFishPosition, gArtFrame), 2)
--
-- set the locH of sprite 15 to getAt(getAt (gHandPosition, gArtFrame), 1)
-- set the locV of sprite 15 to getAt(getAt (gHandPosition, gArtFrame), 2)
--
-- go to frame marker(0) + gArtFrame - 1
--
--
-- end if
--end
--------------------------------------------
on moveArtSprite artSprite, artPosition
global gArtPlay
global gArtFrame
if gArtPlay = FALSE then
set myH to the mouseH
set myV to the mouseV
set posH to the locH of sprite artSprite
set posV to the locV of sprite artSprite
if the puppet of sprite artSprite = FALSE then
set the puppet of sprite artSprite to TRUE
updateStage
put "Puppet off error " & artSprite
end if
repeat while the mouseDown
-- put "down on fish" && the mouseDown
set deltaH to the mouseH - myH + posH
set deltaV to the mouseV - myV + posV
set the locH of sprite artSprite to deltaH
set the locV of sprite artSprite to deltaV
updateStage
end repeat
set newLoc to point( the locH of sprite artSprite, the locV of sprite artSprite )
setAt artPosition, gArtFrame, newLoc
end if
end